<%@page import="cn.edu.sspu.www.util.StringUtil"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
 	<%@include file="../base/csslink.jsp" %>
</head>
<body class="skin-blue sidebar-mini">
<div class="wrapper">	
 	<%@include file="../base/header.jsp" %>
 	<%@include file="../base/sidebar.jsp" %>
 	
 <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
	<section class="content-header">
	  <h1>列表<small>List</small></h1>
	  <ol class="breadcrumb"><li><i class="fa fa-dashboard"></i>&nbsp;&nbsp;教师 信息管理</li></ol>
	</section>
	
    <!-- Main content -->
    <section class="content container-fluid">
	 <div class="box box-primary">      		
            <div class="box-header with-border">
			    <h3 class="box-title"><i class="fa fa-search">&nbsp;筛选条件</i></h3>
			    <div class="box-tools pull-right">
			      <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
			      </button>
			    </div>
			  </div>
		    <div class="box-body">
		    	<form class="form-inline" id="searchForm" action="teacher/list.action" method="post">
		    		<div class="form-group ">
		    			<label class="" for="queryPriceId">姓名&nbsp;</label>
					  	<input type="text" class="form-control input-sm" id="name" name="name" value="${queryVo.name }" placeholder="请输入姓名">
					</div>
		    		<div class="form-group ">
		    			<label class="" for="queryPriceId">性别&nbsp;</label>
		    			<select class="form-control input-sm" name="gender">
		    				<option value="">不限</option>
		    				<option value="男" ${queryVo.gender == "男"?"selected":"" }>男</option>
		    				<option value="女" ${queryVo.gender == "女"?"selected":"" }>女</option>
		    			</select>
					</div>
					<div class="form-group">
				    	<button class="btn btn-primary btn-sm pad-lr-16" type="submit">搜索</button>
					    <button type="button" onclick="clearForm(event)" class="btn btn-warning btn-sm pad-lr-16">清空</button>
				  	</div>
		    	</form><!-- /.form -->
			</div><!-- /.box-body -->
		</div><!-- /.search box -->
		
		<div class="box box-success">
		  
		  <div class="box-header with-border">
	  		<div class="btn-group">
               	<a href="teacher/add.action" class="btn btn-primary btn-sm" title="新增">新增</a>
            </div>
		  </div><!-- /.box-header -->
		  
		  <div class="box-body">
		  	<!-- pager tools -->
		    <div class="dataTables_wrapper form-inline dt-bootstrap">
		    	<div class="row">
		    		<div class="col-sm-12 table-responsive">
		    			<table id="example1" class="table table-bordered table-striped table-hover dataTable">
		    				<thead class="text-nowrap">
							    <tr>
							    	<th>ID</th>
							        <th>姓名</th>
							        <th>性别</th>
							        <th>年龄</th>
							        <th>头像</th>
						          	<th>创建时间</th>
						          	<th>更新时间</th>
						          	<th>操作</th>
							    </tr>
							  </thead>
			               	<tbody>
			                  <c:forEach items="${list}"  var="baseTeacher" >
			                    <tr>
			                      <td>${baseTeacher.id}</td>
			                      <td class="text-wrap">
			                      	${baseTeacher.name}
			                      </td>
			                      <td>${baseTeacher.gender}</td>
			                      <td>${baseTeacher.age}</td>
			                      <td>
			                      	<c:if test="${not empty baseTeacher.headPic}">
						        		<img src="showPic.action?fileName=${baseTeacher.headPic }" style="max-height:50px;" />
						        	</c:if>
			                      </td>
			                      <td><fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${baseTeacher.createTime}" /></td>
			                      <td><fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${baseTeacher.updateTime}" /></td>
			                      <td class="text-nowrap">
			                      	<a class="btn btn-success btn-xs" href="teacher/view.action?id=${baseTeacher.id}">查看</a>
					        		<a class="btn btn-primary btn-xs" href="teacher/edit.action?id=${baseTeacher.id}">修改</a>
					        		<a class="btn btn-warning btn-xs" href="teacher/delete.action?id=${baseTeacher.id}">删除</a>
			                      </td>
			                    </tr>
			                  </c:forEach>
			            	</tbody>
			            </table>
		    		</div>
		    	</div><!-- /.row -->
		    </div>		    
		    
		  </div><!-- /.box-body -->
		</div><!-- /.box -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  
 	<%@include file="../base/footer.jsp" %>
      
</div>
<!-- ./wrapper -->
<%@include file="../base/jslib.jsp" %>
</body>
</html>